'------------------------------------------------------------------------------
' <autogenerated>
'     This code was generated by a tool.
'     Runtime Version: 1.0.2914.16
'
'     Changes to this file may cause incorrect behavior and will be lost if 
'     the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml


<Serializable(),  _
 System.ComponentModel.DesignerCategoryAttribute("code")>  _
Public Class dsInstructors
    Inherits System.Data.DataSet
    
    Private tableInstructors As InstructorsDataTable
    
    Public Sub New()
        MyBase.New
        Me.InitClass
    End Sub
    
    Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New
        Me.InitClass
        Me.GetSerializationData(info, context)
    End Sub
    
    <System.ComponentModel.Browsable(false),  _
     System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)>  _
    Public ReadOnly Property Instructors As InstructorsDataTable
        Get
            Return Me.tableInstructors
        End Get
    End Property
    
    Protected Overrides Function ShouldSerializeTables() As Boolean
        Return false
    End Function
    
    Protected Overrides Function ShouldSerializeRelations() As Boolean
        Return false
    End Function
    
    Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
        Me.ReadXml(reader, XmlReadMode.IgnoreSchema)
    End Sub
    
    Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
        Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
        Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
        stream.Position = 0
        Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
    End Function
    
    Private Sub InitClass()
        Me.DataSetName = "dsInstructors"
        Me.Namespace = "http://www.tempuri.org/dsInstructors.xsd"
        Me.tableInstructors = New InstructorsDataTable
        Me.Tables.Add(Me.tableInstructors)
    End Sub
    
    Private Function ShouldSerializeInstructors() As Boolean
        Return false
    End Function
    
    Public Delegate Sub InstructorsRowChangeEventHandler(ByVal sender As Object, ByVal e As InstructorsRowChangeEvent)
    
    Public Class InstructorsDataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
        
        Private columnInstructor As DataColumn
        
        Private columnInstructorID As DataColumn
        
        Friend Sub New()
            MyBase.New("Instructors")
            Me.InitClass
        End Sub
        
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
        
        Friend ReadOnly Property InstructorColumn As DataColumn
            Get
                Return Me.columnInstructor
            End Get
        End Property
        
        Friend ReadOnly Property InstructorIDColumn As DataColumn
            Get
                Return Me.columnInstructorID
            End Get
        End Property
        
        Public Default ReadOnly Property Item(ByVal index As Integer) As InstructorsRow
            Get
                Return CType(Me.Rows(index),InstructorsRow)
            End Get
        End Property
        
        Public Event InstructorsRowChanged As InstructorsRowChangeEventHandler
        
        Public Event InstructorsRowChanging As InstructorsRowChangeEventHandler
        
        Public Event InstructorsRowDeleted As InstructorsRowChangeEventHandler
        
        Public Event InstructorsRowDeleting As InstructorsRowChangeEventHandler
        
        Public Overloads Sub AddInstructorsRow(ByVal row As InstructorsRow)
            Me.Rows.Add(row)
        End Sub
        
        Public Overloads Function AddInstructorsRow(ByVal Instructor As String) As InstructorsRow
            Dim rowInstructorsRow As InstructorsRow = CType(Me.NewRow,InstructorsRow)
            rowInstructorsRow.ItemArray = New Object() {Instructor, Nothing}
            Me.Rows.Add(rowInstructorsRow)
            Return rowInstructorsRow
        End Function
        
        Public Function FindByInstructorID(ByVal InstructorID As Integer) As InstructorsRow
            Return CType(Me.Rows.Find(New Object() {InstructorID}),InstructorsRow)
        End Function
        
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
        
        Private Sub InitClass()
            Me.columnInstructor = New DataColumn("Instructor", GetType(System.String), "", System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnInstructor)
            Me.columnInstructorID = New DataColumn("InstructorID", GetType(System.Int32), "", System.Data.MappingType.Element)
            Me.columnInstructorID.AutoIncrement = true
            Me.columnInstructorID.AllowDBNull = false
            Me.columnInstructorID.Unique = true
            Me.Columns.Add(Me.columnInstructorID)
            Me.PrimaryKey = New DataColumn() {Me.columnInstructorID}
        End Sub
        
        Public Function NewInstructorsRow() As InstructorsRow
            Return CType(Me.NewRow,InstructorsRow)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            'We need to ensure that all Rows in the tabled are typed rows.
            'Table calls newRow whenever it needs to create a row.
            'So the following conditions are covered by Row newRow(Record record)
            '* Cursor calls table.addRecord(record) 
            '* table.addRow(object[] values) calls newRow(record)    
            Return New InstructorsRow(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(InstructorsRow)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.InstructorsRowChangedEvent) Is Nothing) Then
                RaiseEvent InstructorsRowChanged(Me, New InstructorsRowChangeEvent(CType(e.Row,InstructorsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.InstructorsRowChangingEvent) Is Nothing) Then
                RaiseEvent InstructorsRowChanging(Me, New InstructorsRowChangeEvent(CType(e.Row,InstructorsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.InstructorsRowDeletedEvent) Is Nothing) Then
                RaiseEvent InstructorsRowDeleted(Me, New InstructorsRowChangeEvent(CType(e.Row,InstructorsRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.InstructorsRowDeletingEvent) Is Nothing) Then
                RaiseEvent InstructorsRowDeleting(Me, New InstructorsRowChangeEvent(CType(e.Row,InstructorsRow), e.Action))
            End If
        End Sub
        
        Public Sub RemoveInstructorsRow(ByVal row As InstructorsRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    Public Class InstructorsRow
        Inherits DataRow
        
        Private tableInstructors As InstructorsDataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableInstructors = CType(Me.Table,InstructorsDataTable)
        End Sub
        
        Public Property Instructor As String
            Get
                Try 
                    Return CType(Me(Me.tableInstructors.InstructorColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableInstructors.InstructorColumn) = value
            End Set
        End Property
        
        Public Property InstructorID As Integer
            Get
                Return CType(Me(Me.tableInstructors.InstructorIDColumn),Integer)
            End Get
            Set
                Me(Me.tableInstructors.InstructorIDColumn) = value
            End Set
        End Property
        
        Public Function IsInstructorNull() As Boolean
            Return Me.IsNull(Me.tableInstructors.InstructorColumn)
        End Function
        
        Public Sub SetInstructorNull()
            Me(Me.tableInstructors.InstructorColumn) = System.Convert.DBNull
        End Sub
    End Class
    
    Public Class InstructorsRowChangeEvent
        Inherits EventArgs
        
        Private eventRow As InstructorsRow
        
        Private eventAction As System.Data.DataRowAction
        
        Public Sub New(ByVal row As InstructorsRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As InstructorsRow
            Get
                Return Me.eventRow
            End Get
        End Property
        
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
End Class
